Picture scripts are instructions for drawing technical pictures on the base of partlist variables. They are evaluated in real time.
Picture script in a partlist |
The following functions are provided in the icon bar:
Creates a new picture script; the name of the picture script has to be unique | |
Deletes the selected picture script | |
Executes the selected picture script | |
Exports the selected picture script in a .cs (c#) format | |
Imports a picture script in a .cs (c#) format | |
Inserts an RGB color code by selection from a color box | |
For each partlist any number of picture scripts can be created, e.g. different scripts for different output in the checklist and on printed documents.
The definition of a picture script is made in the following method:
Method for picture script |
Copy Code |
---|---|
protected override void Build() |
In the lower area of the script view an overview of the possible code words is shown with a description for each control. A double click on one of the code words inserts it into the script for its modification.
Call for embedding a picture script into a checklist:
Picture script in a checklist |
Copy Code |
---|---|
ConfLine("=_PicWidth 500", ""); DrawPict("Name"); |
Technical drawing created by a picture script |
Call for embedding a picture script into a measurement sheet:
Picture script in a measurement sheet |
Copy Code |
---|---|
{DrawPict("Name")} |
Using a picture script in a measurement sheet |
The shape that was created by picture scripts can be filled with different patterns.
Example script for patterns |
Copy Code |
---|---|
protected override void Build() { Image (800, 700); int x = 25; int y = 10; string color1 = "lightgrey"; string color2 = "red"; string t; for (int i = 0; i < 53; i++) { t = "P" + i.ToString(); DrawString (t, x, y, 50, 30, "Tahoma", 12, "bold", "center", "black", "", true); DrawRectangle (x, y + 15, 50, 50, 1, t, color1, color2, true); if ((i + 1) % 10 == 0) { x = 25; y += 75; } else x += 75; } t = "true"; DrawString (t, x, y, 50, 30, "Tahoma", 12, "bold", "center", "black", "", true); DrawRectangle (x, y + 15, 50, 50, 1, t, color1, color2, true); x += 75; t = "false"; DrawString (t, x, y, 50, 30, "Tahoma", 12, "bold", "center", "black", "", true); DrawRectangle (x, y + 15, 50, 50, 1, t, color1, color2, true); x = 25; y += 75; for (int i = 1; i < 5; i++) { t = "g" + i.ToString(); DrawString (t, x, y, 125, 30, "Tahoma", 12, "bold", "center", "black", "", true); DrawRectangle (x, y + 15, 125, 125, 1, t, color1, color2, true); x += 150; } } |
Possible patterns given by the example script |